<template>
   <div >
  <p>商品数量:{{ count }}</p>
    <button  v-on:click = "cound += 1">少量代码</button>
    <button  v-on:click="addFn">methods里的函数名</button>
    <button  v-on:click="addCountFn(5)">加五件</button>
    <button @click="btn">事件简化v-on: 以@写法  减一件</button>
   </div>
</template>

<script>
export default {
  data() {
       return {
         count:0
       }
   },
  methods: {
    addFn(){
      this.count++;
    },
    addCountFn(num){
      this.count += num;
    },
    btn(){
      this.count--
    }
  }
}
</script>

<style>
</style>
